package com.koron.tool.mapper;

import com.koron.tool.bean.ToolInspectionBean;
import com.koron.tool.bean.ToolInspectionDetailBean;
import com.koron.tool.bean.ToolInspectionQuery;
import com.koron.tool.bean.ToolQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author: liaodf
 * @Date: 2021/10/25 17:36
 */
public interface ToolInspectionManagerMapper {
    /**
     * 获取待检验的工具
     *
     * @param query
     * @return
     */
    List<ToolInspectionDetailBean> getInspectionTools(ToolQuery query);

    /**
     * 获取检验单据列表
     *
     * @param query
     * @return
     */
    List<ToolInspectionBean> getInspectionList(ToolInspectionQuery query);

    /**
     * 新增检验单
     *
     * @param bean
     * @return
     */
    Integer insert(ToolInspectionBean bean);

    /**
     * 修改检验单
     *
     * @param bean
     * @return
     */
    Integer update(ToolInspectionBean bean);

    /**
     * 批量新增检验单明细
     *
     * @param detailBeanList
     * @return
     */
    Integer batchInsertDetail(List<ToolInspectionDetailBean> detailBeanList);

    /**
     * 删除检验单明细
     *
     * @param inspectionId
     * @return
     */
    Integer deleteInsertDetail(@Param("inspectionId") String inspectionId);

    /**
     * 查询检验单详情
     *
     * @param id
     * @return
     */
    ToolInspectionBean getInspection(@Param("id") String id);

    /**
     * 查询检验单明细
     *
     * @param inspectionId
     * @return
     */
    List<ToolInspectionDetailBean> getInspectionDetailList(@Param("inspectionId") String inspectionId);

    Integer InsertDetail(ToolInspectionDetailBean detailBean);

    List<String> getToolCodes(@Param("dataId") String dataId);

    Integer updateDetail(Map map);

    Integer updateTool(Map map);

    Integer updateToolScrapWhy(Map map);
}
